/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.db.ImportantDateManager;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.util.Util;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintWriter;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import net.sf.json.JSONObject;
/*    */ 
/*    */ public class DeleteImportantDate extends AbstractAction
/*    */ {
/* 20 */   private int id = 0;
/*    */ 
/*    */   public DeleteImportantDate(AbstractHttpServlet servlet) {
/* 23 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public DeleteImportantDate(AbstractHttpServlet servlet, String id) {
/* 27 */     super(servlet);
/* 28 */     this.id = Util.str2Int(id);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 34 */     response.setContentType("text/html;charset=utf-8");
/* 35 */     PrintWriter out = response.getWriter();
/*    */ 
/* 37 */     JSONObject jsonObject = new JSONObject();
/* 38 */     ImportantDateManager manager = new ImportantDateManager();
/* 39 */     int result = manager.delete(this.id, super.getLoginUser(request));
/* 40 */     if (result > 0)
/* 41 */       jsonObject.put("error", "0");
/*    */     else {
/* 43 */       jsonObject.put("error", "1");
/*    */     }
/* 45 */     out.println(jsonObject);
/* 46 */     out.flush();
/* 47 */     out.close();
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.DeleteImportantDate
 * JD-Core Version:    0.6.1
 */